package com.asset.controller;

import com.asset.common.BaseResponse;
import com.asset.common.ResultUtils;
import com.asset.service.DepreciationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 折旧控制层
 */
@RestController
@RequestMapping("/depreciation")
public class DepreciationController {
    @Autowired
    private DepreciationService depreciationService;

    /**
     * 定时任务，定期执行折旧，存放到折旧记录表
     * @return
     */
    @RequestMapping("update")
    public BaseResponse<String> update() {
        depreciationService.update();

        return ResultUtils.success("1");
    }



}
